package com.zttek.videoShareProject.common.json;

import com.zttek.videoShareProject.modules.model.Video;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;

import static com.zttek.videoShareProject.common.utils.DateUtils.String2Long;

/**
 * Created by 13296 on 2018/7/5.
 */
public class VideoVO {
    /**
     * 主页面浏览json对象
     */
    public static class VideoForHome{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 一次返回3条最新视频数据
     */
    public static class RecentThreeVideo{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 一次返回1条最新视频数据
     */
    public static class OneVideo{
        private Long video_id;
        private String title;
        private String intro;
        private String image_url;
        private Integer views;
        private String video_url;
        private String account;
        private String upload_date;//日期date用String输出，格式为年-月-日
        private String total_time;
        private Long user_id;
        private String user_image_url;//上传者用户头像
        private Integer is_follow;//当前用户是否关注 0:未关注，1:关注

        public Long getUser_id() {
            return user_id;
        }

        public void setUser_id(Long user_id) {
            this.user_id = user_id;
        }

        public String getUser_image_url() {
            return user_image_url;
        }

        public void setUser_image_url(String user_image_url) {
            this.user_image_url = user_image_url;
        }

        public Integer getIs_follow() {
            return is_follow;
        }

        public void setIs_follow(Integer is_follow) {
            this.is_follow = is_follow;
        }

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getIntro() {
            return intro;
        }

        public void setIntro(String intro) {
            this.intro = intro;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getVideo_url() {
            return video_url;
        }

        public void setVideo_url(String video_url) {
            this.video_url = video_url;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public String getUpload_date() {
            return upload_date;
        }

        public void setUpload_date(String upload_date) {
            this.upload_date = upload_date;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }
    }

    /**
     * 返回12个热门上升视频数据
     */
    public static class HotVideo{
        private Long video_id;
        private String title;
        private String image_url;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 一次返回4*4条视频数据
     */
    public static class ShowByVideoType{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 上传视频
     */
    public static class UploadVideo{
        //private Long video_id;
        private String title;
        private String intro;
        private String image_url;
        private String video_type;
        private String video_url;
        private Long user_id;
        private Long total_time;

        public UploadVideo(String title, String intro, String image_url, String video_type, String video_url, Long user_id, Long total_time) {
            this.title = title;
            this.intro = intro;
            this.image_url = image_url;
            this.video_type = video_type;
            this.video_url = video_url;
            this.user_id = user_id;
            this.total_time = total_time;
        }

        public Video getVideo(){
            Video video = new Video();
            //video.setVideoId(video_id);
            video.setTitle(title);
            video.setTotalTime(total_time);
            video.setVideoType(video_type);
            video.setUserId(user_id);
            video.setVideoUrl(video_url);
            video.setImageUrl(image_url);
            video.setIntro(intro);
            video.setStatus(0);
            video.setViews(0);
            video.setUploadDate(new Date());
            return video;
        }

//        public Long getVideo_id() {
//            return video_id;
//        }
//
//        public void setVideo_id(Long video_id) {
//            this.video_id = video_id;
//        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getIntro() {
            return intro;
        }

        public void setIntro(String intro) {
            this.intro = intro;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getVideo_type() {
            return video_type;
        }

        public void setVideo_type(String video_type) {
            this.video_type = video_type;
        }

        public String getVideo_url() {
            return video_url;
        }

        public void setVideo_url(String video_url) {
            this.video_url = video_url;
        }

        public Long getUser_id() {
            return user_id;
        }

        public void setUser_id(Long user_id) {
            this.user_id = user_id;
        }

        public Long getTotal_time() {
            return total_time;
        }

        public void setTotal_time(Long total_time) {
            this.total_time = total_time;
        }
    }


    /**
     * 搜索返回2*4条视频数据
     */
    public static class SearchVideo{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 返回用户的视频数据
     */
    public static class UserVideo{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 返回关注的全部用户的视频数据，按上传时间排序
     */
    public static class FollowVideo{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }

    /**
     * 返回用户的历史纪录视频数据
     */
    public static class HistoryVideo{
        private Long video_id;
        private String image_url;
        private String title;
        private String total_time;
        private Integer views;
        private String account;
        private String time;

        public String getTime() {
            return time;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public Long getVideo_id() {
            return video_id;
        }

        public void setVideo_id(Long video_id) {
            this.video_id = video_id;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTotal_time() {
            return total_time;
        }

        public void setTotal_time(String total_time) {
            this.total_time = total_time;
        }

        public Integer getViews() {
            return views;
        }

        public void setViews(Integer views) {
            this.views = views;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }
    }
}
